package com.okilo.online.app.weight.toast

import android.content.Context
import android.view.Gravity
import android.view.LayoutInflater
import android.widget.Toast
import com.okilo.online.app.databinding.OkiloDlogToastBinding

class OkiloToast(private val context: Context, private val text: String, private val time: Int) : Toast(context) {

    init {
        initView()
    }

    private fun initView() {
        val binding = OkiloDlogToastBinding.inflate(LayoutInflater.from(context))
        setView(binding.root)

        binding.textToast.text = text
        setGravity(Gravity.BOTTOM, 0, 200)
        duration = time
    }
}